Implemented the LoadModel function#1
Conversation
|
Hey Sam! I merged your commit to separate branch called load_model. Btw, long term idea is to create test suits based on libsvm data sets. |
There was a problem hiding this comment.
i know it was in original code. but i don't think that it's a good idea to close stream here. stream must be closed by invoking code.
There was a problem hiding this comment.
That's not how I would have written it myself. Because I wasn't sure of your code-porting philosophy, I tried to keep the code as close as possible to the original java. Idiomatic C# would obviously have removed the explicit Close(), and wrapped the whole block in a using(..) statement.
If I get a chance, I'll make the change - or feel free to do it yourself if you like.
There was a problem hiding this comment.
@samueldjack Right. Main idea is to keep math code close to java version, to be able easily update it, when next version of original libsvm will be released.
But for future releases of LibSvmSharp I plan, that main library will contain only learning methods and some basic wrappers. And all helpers, like reading/writing model files, move to separate assembly, and implement it in C# way.
Hi Anatoliy,
Thanks for your work on porting LibSvm to C#.
For one I've my projects I needed to load a libsvm model that had been trained using other tools, so I implemented the the svm_load_model function which was previously commented out.
I haven't done a whole lot of testing on my code - I just know that it works to load in my model.
So you're welcome to pull this code back into your own project if you think it would be useful.
Thanks,
Sam